package com.cskaoyan.mapper.wxMapper;

import com.cskaoyan.bean.bo.vxBo.CartUpdateBo;
import com.cskaoyan.bean.po.wxPo.MarketCart;
import com.cskaoyan.bean.po.wxPo.MarketCartExample;
import com.cskaoyan.bean.po.wxPo.MarketOrder;
import com.cskaoyan.bean.bo.vxBo.CartAddBo;
import com.cskaoyan.bean.bo.vxBo.CartCheckedBo;
import com.cskaoyan.bean.po.wxPo.*;
import com.cskaoyan.bean.vo.vxVo.cartVo.CartTotal;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface MarketCartMapper {
    long countByExample(MarketCartExample example);

    int deleteByExample(MarketCartExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(MarketCart record);

    int insertSelective(MarketCart record);

    List<MarketCart> selectByExample(MarketCartExample example);

    MarketCart selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") MarketCart record, @Param("example") MarketCartExample example);

    int updateByExample(@Param("record") MarketCart record, @Param("example") MarketCartExample example);

    int updateByPrimaryKeySelective(MarketCart record);

    int updateByPrimaryKey(MarketCart record);

    Integer selectgoodscount(@Param("marketUser") MarketUser marketUser);

    Integer selectOneGoodCount(@Param("cartBo") CartAddBo cartBo, @Param("marketUser") MarketUser marketUser);

    void insertOneGoodCount(@Param("cartBo") CartAddBo cartBo, @Param("marketGoodsProduct") MarketGoodsProduct marketGoodsProduct, @Param("marketGood") MarketGoods marketGood, @Param("marketUser") MarketUser marketUser);

    List<CartgoodsPo> queryCart(@Param("marketUser") MarketUser marketUser);

    CartTotal queryCartTotal(@Param("marketUser") MarketUser marketUser);

    CartTotal queryCartTotalCheck(@Param("marketUser") MarketUser marketUser);

    void updateChecked(@Param("cartCheckedBo") CartCheckedBo cartCheckedBo, @Param("productIDs") List<Integer> productIDs, @Param("marketUser") MarketUser marketUser);

    Integer selectAdded(@Param("productId") int productId, @Param("marketUser") MarketUser marketUser);

    void updateNumber(@Param("number") int number, @Param("cartBo") CartAddBo cartBo, @Param("marketUser") MarketUser marketUser);

    void updateDeleteOneCart(@Param("productIDs") List<Integer> productIDs, @Param("marketUser") MarketUser marketUser);

    MarketOrder selectByUserId(Integer userId);

    void updateAddNumber(@Param("cartUpdateBo") CartUpdateBo cartUpdateBo, @Param("marketUser") MarketUser marketUser);

    List<CartgoodsPo> queryCheckCartGood(@Param("cartId") Integer cartId);


    Integer queryOrderTotalprice(@Param("marketUser") MarketUser marketUser);
}
